package com.csaba.connector.citi.parser;

import java.nio.charset.Charset;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.SimpleDateFormat;

public class CitiCodes
{
	public final static String AUTHTOK_CITIDIRECT = "_AUTHTOK_CITIDIRECT_";
	public final static String JSESSIONID = "JSESSIONID";
	public final static String COOKIE_DATES = "DATES";
	public final static String CACHE_ACCOUNTSERVICE_URL = "cache.accountmenu.url";
	public final static String USER_ID = "userId";
	public final static String PASSWORD = "password";
	public final static String SEPARATOR_CVS = ",";
	public final static int HISTORY_TIME_LIMIT = 90;

	public final static Charset HTML_CHARSET = Charset.forName("iso-8859-2");

	public final static ThreadLocal<DecimalFormat> amountFormat = new ThreadLocal<DecimalFormat>()
	{
		@Override
		protected DecimalFormat initialValue()
		{
			final DecimalFormat amount = new DecimalFormat("#,##0");
			final DecimalFormatSymbols symb = new DecimalFormatSymbols();
			symb.setGroupingSeparator('.');
			symb.setDecimalSeparator(',');
			amount.setDecimalFormatSymbols(symb);
			return amount;
		}
	};

	public final static ThreadLocal<SimpleDateFormat> dateFormat = new ThreadLocal<SimpleDateFormat>()
	{
		@Override
		protected SimpleDateFormat initialValue()
		{
			final SimpleDateFormat date = new SimpleDateFormat("dd.MM.yyyy");
			return date;
		}
	};
}
